package com.wsapi.core.dao.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.codehaus.jackson.annotate.JsonIgnore;

@Entity
@Table(name = "sys_role_perm")
public class SysRolePerm {
    private Integer uid;
    private SysRole role;
    private String permKey;

    @ManyToOne
    @JoinColumn(name = "ROLE_ID")
     @JsonIgnore
    public SysRole getRole() {
	return role;
    }

    public void setRole(SysRole sysRole) {
	this.role = sysRole;
    }

    @Column(name = "PERM_KEY", nullable = false)
    public String getPermKey() {
	return permKey;
    }

    public void setPermKey(String permKey) {
	this.permKey = permKey;
    }

    @Id
    @Column(name = "UID")
    @GeneratedValue
    public Integer getUid() {
	return uid;
    }

    public void setUid(Integer uid) {
	this.uid = uid;
    }

}
